<template>
  <div id="app">
    <el-container>
      <my-header :changeView="changeView"></my-header>
      <router-view></router-view>
    </el-container>
  </div>
</template>

<script>
import MyHeader from "./components/MyHeader.vue";
export default {
  name: "App",
  components: {
    MyHeader,
  },
  methods: {
    changeView(options) {
      if (options === 1) this.$router.push("/index");
      else if (options === 2) this.$router.push("/list");
      else if (options === 3) this.$router.push("/messageBoard");
      else if (options === 4) this.$router.push("/appreciates");
      else if (options === 5) this.$router.push("/about");
    },
  },
};
</script>

<style lang="less">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}
body {
  margin: 0;
  height: 100vh;
  min-width: 1050px;
  user-select: none;
}
a {
  background-color: transparent;
  text-decoration: none;
}
b,
strong {
  font-weight: bolder;
}
img {
  border-style: none;
}
button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  /* 1 */
  font-size: 100%;
  /* 1 */
  line-height: 1.15;
  /* 1 */
  margin: 0;
  /* 2 */
}
button,
input {
  /* 1 */
  overflow: visible;
}
button,
select {
  /* 1 */
  text-transform: none;
}
button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
  outline: 1px dotted ButtonText;
}
textarea {
  overflow: auto;
}
[type="checkbox"],
[type="radio"] {
  box-sizing: border-box;
  /* 1 */
  padding: 0;
  /* 2 */
}
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}
[type="search"] {
  -webkit-appearance: textfield;
  /* 1 */
  outline-offset: -2px;
  /* 2 */
}

[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}
::-webkit-file-upload-button {
  -webkit-appearance: button;
  /* 1 */
  font: inherit;
  /* 2 */
}
template {
  display: none;
}
[hidden] {
  display: none;
}
.el-header,
.el-footer {
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-container {
  flex-direction: column !important;
  .el-main {
    color: #333;
    text-align: center;
    height: calc(~"100vh - 60px");
  }
}
</style>
